<div class="table-head fn-clear">
    <div class="fn-l">
    <form name="search" id="search" action="{url('service/add_bom',array('id'=>$id))}" method="post">
      产品名称: <input class="input w80" datatype="*" type="text" name="product" value="{$product}" />
      物料代码: <input class="input w80" datatype="*" type="text" name="code" value="{$code}" />
      物料名称: <input class="input w80" datatype="*" type="text" name="name" value="{$name}" />
      <input type="submit" value="查找" class="button" />
    </form>
    </div>  
</div>
<div class="w600 p10">
<form id="form" action="{url('service/add_bom_save')}">
<input type="hidden" name="id" value="{$id}"/> 
<table class="table table-border">
<thead>
    <tr>
        <td class="w20 fn-tac">#</td>
        <td>产品名称</td>
        <td class="w100 fn-tac">物料代码</td>
        <td class="w100">物料名称</td>
    </tr>
</thead>
<tbody>
{loop $list $vo}
<tr class="{if $vo['amount']<=0}bg-f5{/if}">
    <td class="fn-tac"><input type="checkbox" name="bom_id[]" value="{$vo['id']}" {if $vo['amount'] <= 0}disabled="disabled" {/if} /></td>
    <td>{$vo['product']}</td>
    <td class="fn-tac">{$vo['code']}</td>
    <td>{$vo['name']}</td>
</tr>
{/loop}
</tbody>
</table>
<div id="page" class="fn-clear">
    <div class="fn-l"><input type="submit" value="使用选择配件" class="button button-blue" /></div>
    <div class="fn-r">{$pager}</div>
</div>
</form>
</div>
<script type="text/javascript">
Do('base','form','date','dialog',function(){ 
    $('#form').forms();
})
</script>